#include "Infos.h"

CFileInfo::CFileInfo( int id )
: m_id( id )
, m_fileName( NULL )
, m_fileNameExt( NULL )
, m_size( 0 )
, m_mtime( 0 ){}

CFileInfo::CFileInfo( const CFileInfo& org )
: m_fileName( NULL )
{
	*this = org;
}

CFileInfo::~CFileInfo()
{
	if( m_fileName )
		free( m_fileName );
}

CFileInfo& CFileInfo::operator= ( const CFileInfo& org )
{
	if( this == &org ) return *this;
	m_id = org.m_id;
	SetFileName( org.m_fileName );
	m_attr = org.m_attr;
	m_size = org.m_size;
	m_mtime = org.m_mtime;
	m_atime = org.m_atime;
	m_crtime = org.m_crtime;
	m_selected = org.m_selected;
	return *this;
}